<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./style.css" />
    <title>04_覆盖式响应导航菜单</title>
  </head>
  <body>
    <div id="toggleIcon" onclick="menuTogger()"></div>
    <div id="menu-overlay">
      <ul>
        <li><a href="">Home</a></li>
        <li><a href="">About</a></li>
        <li><a href="">Services</a></li>
        <li><a href="">Portfolio</a></li>
        <li><a href="">Our Team</a></li>
        <li><a href="">Contact</a></li>
      </ul>
    </div>
    <script>
      function menuTogger() {
        const nav = document.getElementById('menu-overlay')
        nav.classList.toggle('active')
        const btn = document.getElementById('toggleIcon')
        btn.classList.toggle('active')
      }
    </script>
  </body>
</html>
